package cc.wenshixin.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import cc.wenshixin.dao.AdminUserDao;
import cc.wenshixin.entity.AdminUser;

@Transactional
public class AdminUserService {
	//属性注入
	private AdminUserDao adminUserDao;
	public void setAdminUserDao(AdminUserDao adminUserDao) {
		this.adminUserDao = adminUserDao;
	}


	public AdminUser login(AdminUser adminUser) {
		return adminUserDao.login(adminUser);
	}


	public void add(AdminUser adminUser) {
		adminUserDao.add(adminUser);
	}


	public List<AdminUser> findAll() {
		return adminUserDao.findAll();
	}


	public AdminUser findOne(int id) {
		return adminUserDao.findOne(id);
	}


	public void update(AdminUser adminUser) {
		adminUserDao.update(adminUser);
	}


	public void delete(AdminUser adminUser) {
		adminUserDao.delete(adminUser);
	}


	public AdminUser findByName(String name) {
		return adminUserDao.findByName(name);
	}
}
